﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HuaCheng.Model
{
    /// <summary>
    /// 通道数据插入数据库所需的类(在通道执行中会发生变化的数据集合）
    /// </summary>
    public class ChannelDataInsert
    {
        //通道数据
        public ChannelState ChlState{ get; set; }
        //通道号
        public string Cid { get; set; }
        //汇总数据的标识
        public int IsAll { get; set; }      
        //工步号
        public int StepNum { get; set; }
        //工步类型
        public int StepType { get; set; }
        //数据类型
        public int WorkType { get; set; }
        //循环次数
        public string Circ { get; set; }
        //测试时间
        public int TestTime { get; set; }
        //并联汇总数据通道号
        public string PaStr { get; set; }
        //是否是追加数据
        public int IsExtraData { get; set; }
        public ChannelDataInsert(ChannelState ChlState, int StepNum, int StepType,
            int WorkType, string Circ, int TestTime, string PaStr, int IsExtraData)
        {
            this.ChlState = ChlState;
            if (PaStr == "")
            {
                this.Cid = Convert.ToString(ChlState.CID + 1);
                this.IsAll = 0;
            }
            else
            {
                this.Cid = PaStr;
                this.IsAll = ChlState.CID + 1;
            }
            this.StepNum = StepNum;
            this.StepType = StepType;
            this.WorkType = WorkType;
            this.Circ = Circ;
            this.TestTime = TestTime;
            this.IsExtraData = IsExtraData;
        }
        

    }
}
